<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>听到微笑的博客</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/style.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/font-awesome.min.css">
<link rel="apple-touch-icon-precomposed" href="${pageContext.request.contextPath }/images/icon/icon.png">
<link rel="shortcut icon" href="${pageContext.request.contextPath }/images/icon/favicon.ico">
<script src="${pageContext.request.contextPath }/js/jquery-2.1.4.min.js"></script>
</head>

<body class="user-select">
	<section class="container-fluid">
		<jsp:include page="common/top.jsp"></jsp:include>
		<div class="row">
			<jsp:include page="common/left.jsp"></jsp:include>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
				<h1 class="page-header">信息总览</h1>
				<div class="row placeholders">
					<div class="col-xs-6 col-sm-3 placeholder">
						<a href="${pageContext.request.contextPath }/article.html">
						<h4><span class="glyphicon glyphicon-book" style="margin-right: 8px"></span>文章</h4>
						<span class="text-muted">${pageData.articleNum } 篇</span>
						</a>
					</div>
					<div class="col-xs-6 col-sm-3 placeholder">
						<a href="${pageContext.request.contextPath }/comment.html">
						<h4><span class="glyphicon glyphicon-edit" style="margin-right: 8px"></span>评论</h4>
						<span class="text-muted">${pageData.commentNum } 条</span>
						</a>
					</div>
					<div class="col-xs-6 col-sm-3 placeholder">
						<a href="flink.html">
						<h4><span class="glyphicon glyphicon-link" style="margin-right: 8px"></span>友链</h4>
						<span class="text-muted">${pageData.linkNum } 条</span>
						</a>
					</div>
					<div class="col-xs-6 col-sm-3 placeholder">
						<h4><span class="glyphicon glyphicon-globe" style="margin-right: 8px"></span>访问量</h4>
						<span class="text-muted">${pageData.visitNum }</span>
					</div>
				</div>
				<h1 class="page-header">状态</h1>
				<div class="table-responsive">
					<table class="table table-striped table-hover">
						<tbody>
							<tr>
								<td>登录者: <span>${user.name }</span>，这是您第 <span>${pageData.loginNum }</span> 次登录
								</td>
							</tr>
							<tr>
								<td>上次登录时间: ${lastVisitLog.stringVisittime } , 上次登录${lastVisitLog.ipaddr }</td>
							</tr>
						</tbody>
					</table>
				</div>
				<h1 class="page-header">系统信息</h1>
				<div class="table-responsive">
					<table class="table table-striped table-hover">
						<thead>
							<tr>
							</tr>
						</thead>
						<tbody>
							<tr>
								<td>管理员个数:</td>
								<td>2 人</td>
								<td>服务器软件:</td>
								<td>Apache Tomcat 7.0.57</td>
							</tr>
							<tr>
								<td>浏览器:</td>
								<td>${pageData.browser }</td>
								<td>程序编码:</td>
								<td>UTF-8</td>
							</tr>
							<tr>
								<td>操作系统:</td>
								<td>${pageData.system }</td>
								<td>MYSQL版本:</td>
								<td>5.5.40</td>
							</tr>
							<tr>
								<td>登录者IP:</td>
								<td>${pageData.ip }</td>
								<td>当前时间:</td>
								<td id="currentTime"></td>
							</tr>
						</tbody>
						<tfoot>
							<tr></tr>
						</tfoot>
					</table>
				</div>
			</div>
		</div>
	</section>
	<script src="${pageContext.request.contextPath }/js/bootstrap.min.js"></script>
	<script src="${pageContext.request.contextPath }/js/admin-scripts.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#report").addClass('active');
			var date = new Date(); //获取系统当前时间
			var year = date.getFullYear();
			var month = date.getMonth() + 1;
			var day = date.getDate();
	
			var hours = date.getHours();
			var minutes = date.getMinutes();
			var seconds = date.getSeconds(); //获取当前秒数(0-59)
			$("#currentTime").append(year + "-" + month + "-" + day + "  " + hours + ":" + minutes + ":" + seconds);
		})
	</script>
</body>
</html>
